<template>
  <div class="guess-you-like-container">
    <h2>猜你喜欢</h2>
    <div class="products">
      <div v-for="product in products" :key="product.cid" class="product-item">
        <img :src="product.imgPath" :alt="product.name">
        <p>{{ product.name }}</p>
        <p>¥{{ product.price }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'GuessYouLikeComponent',
  data() {
    return {
      products: [
        // 根据提供的数据填充商品
        { cid: '001001', name: '华为手机', imgPath: 'https://placehold.co/600x400', price: '3588' },
        { cid: '001002', name: '华为笔记本', imgPath: 'https://placehold.co/600x400', price: '5499' },
        // 其他商品...
      ]
    };
  },
};
</script>

<style scoped>
.guess-you-like-container {
  padding: 20px;
}

.products {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.product-item {
  width: 20%;
  margin-bottom: 20px;
  text-align: center;
}
</style>